import request from "../utils/request";
// 根据id文章
export function getById(id) {
  return request.get(`/articleManagement/${id}`);
}
// 获取文章列表
export function getList(params) {
  return request.get("/articleManagement", { params: params });
}

// 添加文章
export function addArticle(data) {
  return request.post("/articleManagement", data, {"Content-Type": " multipart/form-data"});
}
//修改文章状态
export function vimArticle(id, delivery) {
  return request.post(`/articleManagement/IsActived/${id}`, delivery);
}

// 修改文章
export function modArticle(id, data) {
         return request.put(`/articleManagement/${id}`, data);
       }
//删除文章
export function deleteArticle(id, data) {
         return request.delete(`/articleManagement/${id}`, data);
       }
